博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
wordpress 系列之 header 导航
阅读量:6865 次
发布时间:2019-06-26

本文共 914 字,大约阅读时间需要 3 分钟。

使用Menu Maker 进行导航设计的批量处理,使用默认的links表来保存导航

首先安装插件:

 或者 

说明文档:

  1. Upload the menumaker directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress
  3. Go to Options > Menu Maker and change options and add menus
  4. Place <?php id_menu_maker(); ?> in your templates

上面是原始的安装方式。

此时我们来修改文件。

1,打开文件menumaker.php,添加如下的函数。

//use  the default link table to show links.function sql_menu_maker() {    global $wpdb;//调用系统的数据库配置    $output = '';    $links = $wpdb->get_results ( "Select link_name,link_url from `$wpdb->links" );//系统的数据库查询结果集函数    $output .= "
"; echo $output;}

2,打开需要存放导航的template:

这样以后添加的links 就可以在页面上作为导航显示了,同时呢,也可以自定义导航的css,方便操作。

 

转载于:https://www.cnblogs.com/awinlei/archive/2013/01/09/2853180.html

你可能感兴趣的文章
前端小随笔
查看>>
view属性大全
查看>>
Java文件编码示例
查看>>
CactiFans V1.0中文版发布
查看>>
HTML如何显示小于号“<”等特殊符号?
查看>>
别伤了虚拟桌面管理员的"心"
查看>>
Windows系统使用IntelliJ IDEA 搭建Hadoop的开发调试环境(一)
查看>>
yum安装lamp
查看>>
Web.Config文件中数据库连接配置
查看>>
[Unity 3D] Unity 3D 性能优化 (一)
查看>>
spring Quartz定时任务调度 时间设置
查看>>
SymmetricDS: 数据库数据同步Database synchronization
查看>>
Disabling OOM killer on Ubuntu 14.04
查看>>
VBS备份脚本
查看>>
CentOS 6.5 自动安装镜像
查看>>
Storm与Spark Streaming比较
查看>>
我的友情链接
查看>>
Exchange Server 运维管理01:Exchange中Active Directory 有什么用?
查看>>
dhcp服务在企业中的应用
查看>>
linux系统管理之四:服务状态
查看>>